package com.zb;

import com.zb.dto.SkuDTO;
import com.zb.repository.SkuRepository;
import org.elasticsearch.action.index.IndexResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/search")
public class Controller {

    @Autowired
    private SkuRepository repository;

    @PostMapping("/add")
    public Boolean save(@RequestBody Map<String,String> maps){
        repository.saveNew(maps);
        return true;
    }
}
